home *** CD-ROM | disk | FTP | other *** search
- Path: news.mira.net.au!news
- From: davidw@werple.net.au (David White)
- Newsgroups: comp.lang.c++
- Subject: Re: Constructor Called for Global Class Instance
- Date: 7 Feb 1996 19:37:22 +1100
- Organization: Werple Internet, Melbourne
- Message-ID: <4f9oc2$7g9@werple.net.au>
- References: <4f94ri$12p@dub-news-svc-3.compuserve.com>
- NNTP-Posting-Host: werple.mira.net.au
- Keywords: C++ Constructor
-
- <72421.1131@compuserve.com> writes:
-
-
- >A quick question pertaining to the following snippet of code:
-
- >// Snipet
- >#include "MyClass.h"
- >MyClass junk;
-
- >int main(int ac, char **av)
- >{
-
- >etc....
-
- >Given that there is a constructor MyClass(), if I load this sucker up in a debugger
- >and set a breakpoint in the constructor function, should I break in the function? In
- >other words, does the constructor of a class get called when the class is
- >defined outside of an executed function?
-
- >And if this is a RTF FAQ, sorry; please point to the FAQ.
-
- >TIA
- >TIA
-
- All static and global objects are properly constructed before 'main' is
- called.
-
- David White
- davidw@werple.mira.net.au
-
-